package com.juhuixing.user.server.feign;

import com.juhuixing.common.assembly.trans.TransConfiguration;
import com.juhuixing.user.server.feign.aspect.DefaultErrDesc;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 *@ClassName AuthService
 *@Description TODO
 *@Author 刘猛
 *@Date 2019/3/19 10:39
 **/
@FeignClient(name = "shop-oauth-service",configuration = TransConfiguration.class)
public interface AuthService {

    @DefaultErrDesc
    @GetMapping("oauth/token")
    Object authToken(@RequestParam(value = "grant_type") String grant_type
            ,@RequestParam(value = "username") String username
            ,@RequestParam(value = "password") String password
            ,@RequestParam(value = "client_id") String client_id
            ,@RequestParam(value = "client_secret") String client_secret);
}
